package mzt;

import java.io.File;
import java.net.URL;

import org.apache.commons.io.FileUtils;
import org.jsoup.Connection.Response;
import org.jsoup.Jsoup;

public class Demo4Pub {

	public static void main(String[] args) throws Exception {
		// String url =
		// "http://www.xingmeng365.com/upload/image/20180331/20180331190056065606.jpg";

		String url = "http://imglf5.nosdn.127.net/img/a3FoNjhHWkN1MnJvSzA0YzUvdmlXaFhxa3ZDRk4raFVwTnl0dUtEeU5rOEFvWTlDSFhKWGN3PT0.jpg?imageView&thumbnail=1680x0&quality=96&stripmeta=0&type=jpg";
		FileUtils.copyURLToFile(new URL(url), new File("c://123.jpg"));

		Response execute = Jsoup.connect("https://www.jianshu.com/p/968b61480d11").execute();
		int statusCode = execute.statusCode();
		String string = execute.body();

		System.out.println(string);
		System.out.println(statusCode);

		URL source = new URL("http://v3-dy.ixigua.com/a67924ea38a6e2ae19ace52610e42bb6/5abf93cb/video/m/220970b45e491ce42cb8b2913af6476ba891142e8700001725fdf73185/");
		File destination = new File("c://1.mp4");
		FileUtils.copyURLToFile(source, destination);
	}

}
